<?php
/**
* Gives out the links to jump to the other tags
*/
function smarty_modifier_tags($tags_csv='')
{
	$tags = array_map('trim', preg_split('/\s?[,|;|]+\s?/is', $tags_csv));
	#print_r($tags);
	
	# Real links: use the IDs of the tags
	
	# Search links
	foreach($tags as $t => $tag)
	{
		$taghtml = urlencode($tag);
		$tags[$t] = "<a href='tags-search?tag={$taghtml}'>{$tag}</a>";
	}
	
	return implode(', ', $tags);
}
?>